package com.kelaite.procurement.entity;

// Generated 2016-3-6 15:13:23 by Hibernate Tools 3.4.0.CR1

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.validator.constraints.NotBlank;

/**
 * record all pipelines belongs to this specific vendor TPipelineItem generated
 * by hbm2java
 */
@Entity(name = "t_pipeline_lineitem")
public class TPipelineItem extends TBaseEntity {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id")
	private Long id;

	@ManyToOne(cascade = CascadeType.REFRESH, optional = false)
	@JoinColumn(name = "bid_id")
	private TPipelineHeader tPipelineHeader;

	@Column(name = "display_order_no", length = 3)
	private Integer displayOrderNo; // 只是一个序号

	@Column(name = "bid_description", length = 200)
	private String bidDescription;

	@Column(name = "open_time", nullable = true)
	private Date openTime;

	@Column(name = "close_time", nullable = true)
	private Date closeTime;

	@Column(name = "bid_open_time")
	private Date bidOpenTime;

	@Column(name = "presentation_time")
	private Date presentationTime;

	@Column(name = "doc_download_1", length = 500)
	private String docDownload1;

	@Column(name = "doc_download_2", length = 500)
	private String docDownload2;

	@Column(name = "doc_download_3", length = 500)
	private String docDownload3;

	@Column(name = "accept")
	private boolean accept; // Y ： 接受; N: 不接受

	@Column(name = "bid_type", length = 1)
	private Integer bidType; // 1、招标 2、授予 3、议标

	@Column(name = "is_participate")
	private boolean isParticipate; // true 参加， false 不参加（默认）(乙方决定是否参加)

	@Column(name = "gmt_create_time")
	private Date gmtCreateTime;

	@Column(name = "gmt_update_time")
	private Date gmtUpdateTime;

	@Column(name = "created_by")
	private String createdBy;

	@Column(name = "updated_by")
	private String updatedBy;

	@Column(name = "is_delete")
	private boolean isDelete;

	@ManyToOne(cascade = CascadeType.REFRESH, optional = true)
	@JoinColumn(name = "company_id_1")
	@NotFound(action = NotFoundAction.IGNORE)
	private TCompany companyId1;

	@ManyToOne(cascade = CascadeType.REFRESH, optional = true)
	@JoinColumn(name = "company_id_2")
	@NotFound(action = NotFoundAction.IGNORE)
	private TCompany companyId2;

	@ManyToOne(cascade = CascadeType.REFRESH, optional = true)
	@JoinColumn(name = "company_id_3")
	@NotFound(action = NotFoundAction.IGNORE)
	private TCompany companyId3;

	private String contactUser;

	private String contactPhone;

	private String contactEmail;

	public TPipelineItem() {

	}

	public Long getId() {

		return id;
	}

	public void setId(Long id) {

		this.id = id;
	}

	public TPipelineHeader gettPipelineHeader() {

		return tPipelineHeader;
	}

	public void settPipelineHeader(TPipelineHeader tPipelineHeader) {

		this.tPipelineHeader = tPipelineHeader;
	}

	public Integer getDisplayOrderNo() {

		return displayOrderNo;
	}

	public void setDisplayOrderNo(Integer displayOrderNo) {

		this.displayOrderNo = displayOrderNo;
	}

	@NotBlank(message = "请输入招标描述信息！")
	public String getBidDescription() {

		return bidDescription;
	}

	public void setBidDescription(String bidDescription) {

		this.bidDescription = bidDescription;
	}

	public Date getOpenTime() {

		return openTime;
	}

	public void setOpenTime(Date openTime) {

		this.openTime = openTime;
	}

	public Date getCloseTime() {

		return closeTime;
	}

	public void setCloseTime(Date closeTime) {

		this.closeTime = closeTime;
	}

	public Date getBidOpenTime() {

		return bidOpenTime;
	}

	public void setBidOpenTime(Date bidOpenTime) {

		this.bidOpenTime = bidOpenTime;
	}

	public Date getPresentationTime() {

		return presentationTime;
	}

	public void setPresentationTime(Date presentationTime) {

		this.presentationTime = presentationTime;
	}

	public String getDocDownload1() {

		return docDownload1;
	}

	public void setDocDownload1(String docDownload1) {

		this.docDownload1 = docDownload1;
	}

	public String getDocDownload2() {

		return docDownload2;
	}

	public void setDocDownload2(String docDownload2) {

		this.docDownload2 = docDownload2;
	}

	public String getDocDownload3() {

		return docDownload3;
	}

	public void setDocDownload3(String docDownload3) {

		this.docDownload3 = docDownload3;
	}

	public boolean isAccept() {

		return accept;
	}

	public void setAccept(boolean accept) {

		this.accept = accept;
	}

	public Integer getBidType() {

		return bidType;
	}

	public void setBidType(Integer bidType) {

		this.bidType = bidType;
	}

	public boolean isParticipate() {

		return isParticipate;
	}

	public void setParticipate(boolean isParticipate) {

		this.isParticipate = isParticipate;
	}

	public Date getGmtCreateTime() {

		return gmtCreateTime;
	}

	public void setGmtCreateTime(Date gmtCreateTime) {

		this.gmtCreateTime = gmtCreateTime;
	}

	public Date getGmtUpdateTime() {

		return gmtUpdateTime;
	}

	public void setGmtUpdateTime(Date gmtUpdateTime) {

		this.gmtUpdateTime = gmtUpdateTime;
	}

	public String getCreatedBy() {

		return createdBy;
	}

	public void setCreatedBy(String createdBy) {

		this.createdBy = createdBy;
	}

	public String getUpdatedBy() {

		return updatedBy;
	}

	public void setUpdatedBy(String updatedBy) {

		this.updatedBy = updatedBy;
	}

	public boolean isDelete() {

		return isDelete;
	}

	public void setDelete(boolean isDelete) {

		this.isDelete = isDelete;
	}

	public TCompany getCompanyId1() {

		return companyId1;
	}

	public void setCompanyId1(TCompany companyId1) {

		this.companyId1 = companyId1;
	}

	public TCompany getCompanyId2() {

		return companyId2;
	}

	public void setCompanyId2(TCompany companyId2) {

		this.companyId2 = companyId2;
	}

	public TCompany getCompanyId3() {

		return companyId3;
	}

	public void setCompanyId3(TCompany companyId3) {

		this.companyId3 = companyId3;
	}

	@NotBlank(message = "请输入联系人！")
	public String getContactUser() {

		return contactUser;
	}

	public void setContactUser(String contactUser) {

		this.contactUser = contactUser;
	}

	@NotBlank(message = "请输入联系人电话！")
	public String getContactPhone() {

		return contactPhone;
	}

	public void setContactPhone(String contactPhone) {

		this.contactPhone = contactPhone;
	}

	@NotBlank(message = "请输入联系人邮箱！")
	public String getContactEmail() {

		return contactEmail;
	}

	public void setContactEmail(String contactEmail) {

		this.contactEmail = contactEmail;
	}

}
